﻿package com.sos.ui
{ 
	import flash.text.TextField;
    import flash.display.MovieClip;
	import com.sos.logging.Logger;
	import flash.display.Bitmap;
	import com.deadreckoned.assetmanager.AssetManager;
	
	public class EffectDetailBox extends MovieClip 
    {
		public var effectName:TextField;
		public var effectText:TextField;
		public var cardImage:Bitmap;
		
		public function EffectDetailBox() {
		}
		
		public function show(effect:Effect):void {
			cardImage = new Bitmap(AssetManager.getInstance().get(effect.imageId).asset, "auto", true);
			effectName.text = effect.effectName;
			effectText.text = effect.effectText + " (Id: " + effect.effectId + ")";
			addChildAt(cardImage, 0);
			visible = true;
		}
		public function hide():void {
			effectName.text = '';
			effectText.text = '';
			removeChild(cardImage);
			visible = false;
		}
		
		public function dispose():void {
		}
	}
}